﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestWindowsServices
{
    public class Library
    {
        public static void WriteErrorLog(string Message)
        {
            StreamWriter sw = null;
            try
            {
                sw = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + "\\LogFile.txt", true);
                sw.WriteLine("\r\n-----------------------------------------------------------");
                sw.WriteLine("Iniciando a gravação de LOG : " + DateTime.Now.ToLongTimeString()+"\r\n"+Message);
                sw.Flush();
                sw.Close();
            }
            catch
            {
            }
        }


    }
}
